package com.p2p.front.web.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.p2p.base.model.BaseUser;
import com.p2p.base.page.PageVo;
import com.p2p.base.web.controller.BaseController;
import com.p2p.front.service.RechargeService;

/**
 * leiwen@yiqihao.com
 */
@Controller
@RequestMapping(value = "/recharge")
public class RechargeController extends BaseController {

	@Resource
	private RechargeService rechargeService;
		
	@RequestMapping(value = "/list")
	public String list(PageVo form,HttpServletRequest request, Model model) {
		BaseUser user = getCurrentUser();
		form.getParams().put("uid", user.getId());
		form.handleIntDate();
		PageVo page =  rechargeService.list(form);
		form.resetDate();
		model.addAttribute("page", page);
		return "recharge/list";
	}
	
}
